﻿using GraphProcessor;
using IQIGame.Onigao.Logic;
using LFloatMath.Math;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(SkillEditorConst.SkillEffective + "/" + SkillEditorConst.CureToShield, typeof(SkillEditorGraph))]
    public class SkillEffectiveNode_CureToShield : SkillEffectiveNode
    {
        protected override ESkillEffectiveType effectType => ESkillEffectiveType.CureToShield;
        
        [Input("治疗公式"), ShowAsDrawer] public int cureFormula;
        [Input("过量治疗转护盾比例"), ShowAsDrawer] public float shieldRate;
        [Input("护盾持续时间"), ShowAsDrawer] public int shieldDuration;
        
        protected override SkillCustomConfig CreateConfig()
        {
            var rConfig = new SkillEffective_CureToShield_ConfigData()
            {
                cureFormula = this.cureFormula,
                shieldRate = new LFloat(false, this.shieldRate)._val,
                shieldDuration = this.shieldDuration,
            };
            return rConfig;
        }
    }
}